#!/usr/bin/env python
from sys import argv

__author__ = 'gogo'

obj = argv[1]

print """\
#!/usr/bin/env python

__author__ = 'gogo'

__version__ = '0.0.1'

%(obj)s_wiki_index = {\
""" % locals()

with open('test_result/'+argv[1]+'_test.txt') as f:
    for line in f:
        if len(line) > 2:
            part = line.split()
            print " "*3, "'"+part[0]+"'"+':',part[2].strip(',').replace(')', '')+','

print "}"